<template>
    <a-date-picker 
        @change="onChangeTime" 
        placeholder="设置到期时间" 
        :disabled-date="disabledStartDate"
        :locale="locale"
        style="width:150px;"/>
</template>
<script>
import moment from 'moment';
import locale from 'ant-design-vue/es/date-picker/locale/zh_CN';
export default {
    name:'singleDate',
    data(){
        return{
            locale
        }
    },
    methods:{
        moment,
        disabledStartDate(current) {
            return current && current < moment().subtract(1, "days");
        },
        onChangeTime(data){
            this.$emit('getVipTime',moment(data).format('YYYY-MM-DD'))
        }
    }
}
</script>